<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::PamiToy Class Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_pami_toy.html">PamiToy</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_pami_toy-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::PamiToy Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_data_distribution_8h_source.html">shark/Data/DataDistribution.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::PamiToy:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_pami_toy__inherit__graph.png" border="0" usemap="#ashark_1_1_pami_toy_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_pami_toy_inherit__map" id="ashark_1_1_pami_toy_inherit__map">
<area shape="rect" title=" " alt="" coords="49,94,162,120"/>
<area shape="rect" href="classshark_1_1_labeled_data_distribution.html" title=" " alt="" coords="5,5,206,46"/>
<area shape="poly" title=" " alt="" coords="108,62,108,93,103,93,103,62"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a77a00e9bdae220f5b1054564835b7cf0" id="r_a77a00e9bdae220f5b1054564835b7cf0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_pami_toy.html#a77a00e9bdae220f5b1054564835b7cf0">PamiToy</a> (unsigned int size_useful=5, unsigned int size_noise=5, double noise_position=0.0, double noise_variance=1.0)</td></tr>
<tr class="separator:a77a00e9bdae220f5b1054564835b7cf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b2eaab3d024a8731d184f3ed5f38949" id="r_a7b2eaab3d024a8731d184f3ed5f38949"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_pami_toy.html#a7b2eaab3d024a8731d184f3ed5f38949">draw</a> (RealVector &amp;input, unsigned int &amp;label) const</td></tr>
<tr class="memdesc:a7b2eaab3d024a8731d184f3ed5f38949"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a single pair of input and label.  <br /></td></tr>
<tr class="separator:a7b2eaab3d024a8731d184f3ed5f38949"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_labeled_data_distribution"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_labeled_data_distribution')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_labeled_data_distribution.html">shark::LabeledDataDistribution&lt; RealVector, unsigned int &gt;</a></td></tr>
<tr class="memitem:a179adab2dc89217d47fe1d0736679c46 inherit pub_methods_classshark_1_1_labeled_data_distribution" id="r_a179adab2dc89217d47fe1d0736679c46"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_labeled_data_distribution.html#a179adab2dc89217d47fe1d0736679c46">~LabeledDataDistribution</a> ()</td></tr>
<tr class="memdesc:a179adab2dc89217d47fe1d0736679c46 inherit pub_methods_classshark_1_1_labeled_data_distribution"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <br /></td></tr>
<tr class="separator:a179adab2dc89217d47fe1d0736679c46 inherit pub_methods_classshark_1_1_labeled_data_distribution"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a198219fda4f514aa5bba30629e57dd8c inherit pub_methods_classshark_1_1_labeled_data_distribution" id="r_a198219fda4f514aa5bba30629e57dd8c"><td class="memItemLeft" align="right" valign="top">std::pair&lt; RealVector, unsigned int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_labeled_data_distribution.html#a198219fda4f514aa5bba30629e57dd8c">operator()</a> ()</td></tr>
<tr class="separator:a198219fda4f514aa5bba30629e57dd8c inherit pub_methods_classshark_1_1_labeled_data_distribution"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace15c1b51c87cd4b553427a55416b155 inherit pub_methods_classshark_1_1_labeled_data_distribution" id="r_ace15c1b51c87cd4b553427a55416b155"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; RealVector, unsigned int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_labeled_data_distribution.html#ace15c1b51c87cd4b553427a55416b155">generateDataset</a> (std::size_t size, std::size_t maximumBatchSize) const</td></tr>
<tr class="memdesc:ace15c1b51c87cd4b553427a55416b155 inherit pub_methods_classshark_1_1_labeled_data_distribution"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a dataset with samples from from the distribution.  <br /></td></tr>
<tr class="separator:ace15c1b51c87cd4b553427a55416b155 inherit pub_methods_classshark_1_1_labeled_data_distribution"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a812eed2420c425e7943e73503dcf1155 inherit pub_methods_classshark_1_1_labeled_data_distribution" id="r_a812eed2420c425e7943e73503dcf1155"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; RealVector, unsigned int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_labeled_data_distribution.html#a812eed2420c425e7943e73503dcf1155">generateDataset</a> (std::size_t size) const</td></tr>
<tr class="memdesc:a812eed2420c425e7943e73503dcf1155 inherit pub_methods_classshark_1_1_labeled_data_distribution"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a data set with samples from from the distribution.  <br /></td></tr>
<tr class="separator:a812eed2420c425e7943e73503dcf1155 inherit pub_methods_classshark_1_1_labeled_data_distribution"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a128a177bba9c3d7c8740734566ce2b4c" id="r_a128a177bba9c3d7c8740734566ce2b4c"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_pami_toy.html#a128a177bba9c3d7c8740734566ce2b4c">m_size</a></td></tr>
<tr class="separator:a128a177bba9c3d7c8740734566ce2b4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26f24fc417342256f19c04ddefd99243" id="r_a26f24fc417342256f19c04ddefd99243"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_pami_toy.html#a26f24fc417342256f19c04ddefd99243">m_sizeUseful</a></td></tr>
<tr class="separator:a26f24fc417342256f19c04ddefd99243"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57a26d670c6e8a07b523578d3b3702a9" id="r_a57a26d670c6e8a07b523578d3b3702a9"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_pami_toy.html#a57a26d670c6e8a07b523578d3b3702a9">m_sizeNoise</a></td></tr>
<tr class="separator:a57a26d670c6e8a07b523578d3b3702a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84333c396fe766ff07cd3dc4bac92b9c" id="r_a84333c396fe766ff07cd3dc4bac92b9c"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_pami_toy.html#a84333c396fe766ff07cd3dc4bac92b9c">m_noisePos</a></td></tr>
<tr class="separator:a84333c396fe766ff07cd3dc4bac92b9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95a789beda041b7d439a501bee325947" id="r_a95a789beda041b7d439a501bee325947"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_pami_toy.html#a95a789beda041b7d439a501bee325947">m_noiseVar</a></td></tr>
<tr class="separator:a95a789beda041b7d439a501bee325947"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>"Pami Toy" problem for binary classification, as used in the article "Glasmachers
and C. Igel. Maximum Likelihood Model Selection for 1-Norm Soft Margin SVMs with Multiple 
Parameters. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2010." In summary, the first M dimensions are correlated to the labels, the last N dimensions are not. <br  />
 </p>

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00217">217</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a77a00e9bdae220f5b1054564835b7cf0" name="a77a00e9bdae220f5b1054564835b7cf0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77a00e9bdae220f5b1054564835b7cf0">&#9670;&#160;</a></span>PamiToy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">shark::PamiToy::PamiToy </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>size_useful</em> = <code>5</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>size_noise</em> = <code>5</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>noise_position</em> = <code>0.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>noise_variance</em> = <code>1.0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00220">220</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a7b2eaab3d024a8731d184f3ed5f38949" name="a7b2eaab3d024a8731d184f3ed5f38949"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b2eaab3d024a8731d184f3ed5f38949">&#9670;&#160;</a></span>draw()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::PamiToy::draw </td>
          <td>(</td>
          <td class="paramtype">RealVector &amp;&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int &amp;&#160;</td>
          <td class="paramname"><em>label</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generates a single pair of input and label. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">input</td><td>the generated input </td></tr>
    <tr><td class="paramname">label</td><td>the generated label </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classshark_1_1_labeled_data_distribution.html#ace4a2b81e54f0944d241b92a54f1a4c2">shark::LabeledDataDistribution&lt; RealVector, unsigned int &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00228">228</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">References <a class="el" href="namespaceshark_1_1random.html#aa64d4174eaf7111b03e0504eaa56b666">shark::random::discrete()</a>, <a class="el" href="namespaceshark_1_1random.html#a972c5f7f031612a130aa077fc9136a9f">shark::random::gauss()</a>, <a class="el" href="namespaceshark_1_1random.html#ab5c1547eee483974d008d43f621a2234">shark::random::globalRng</a>, <a class="el" href="classshark_1_1_pami_toy.html#a84333c396fe766ff07cd3dc4bac92b9c">m_noisePos</a>, <a class="el" href="classshark_1_1_pami_toy.html#a95a789beda041b7d439a501bee325947">m_noiseVar</a>, <a class="el" href="classshark_1_1_pami_toy.html#a128a177bba9c3d7c8740734566ce2b4c">m_size</a>, and <a class="el" href="classshark_1_1_pami_toy.html#a26f24fc417342256f19c04ddefd99243">m_sizeUseful</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a84333c396fe766ff07cd3dc4bac92b9c" name="a84333c396fe766ff07cd3dc4bac92b9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84333c396fe766ff07cd3dc4bac92b9c">&#9670;&#160;</a></span>m_noisePos</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double shark::PamiToy::m_noisePos</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00246">246</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_pami_toy.html#a7b2eaab3d024a8731d184f3ed5f38949">draw()</a>.</p>

</div>
</div>
<a id="a95a789beda041b7d439a501bee325947" name="a95a789beda041b7d439a501bee325947"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a95a789beda041b7d439a501bee325947">&#9670;&#160;</a></span>m_noiseVar</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double shark::PamiToy::m_noiseVar</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00247">247</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_pami_toy.html#a7b2eaab3d024a8731d184f3ed5f38949">draw()</a>.</p>

</div>
</div>
<a id="a128a177bba9c3d7c8740734566ce2b4c" name="a128a177bba9c3d7c8740734566ce2b4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a128a177bba9c3d7c8740734566ce2b4c">&#9670;&#160;</a></span>m_size</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int shark::PamiToy::m_size</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00243">243</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_pami_toy.html#a7b2eaab3d024a8731d184f3ed5f38949">draw()</a>.</p>

</div>
</div>
<a id="a57a26d670c6e8a07b523578d3b3702a9" name="a57a26d670c6e8a07b523578d3b3702a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57a26d670c6e8a07b523578d3b3702a9">&#9670;&#160;</a></span>m_sizeNoise</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int shark::PamiToy::m_sizeNoise</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00245">245</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

</div>
</div>
<a id="a26f24fc417342256f19c04ddefd99243" name="a26f24fc417342256f19c04ddefd99243"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26f24fc417342256f19c04ddefd99243">&#9670;&#160;</a></span>m_sizeUseful</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int shark::PamiToy::m_sizeUseful</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_data_distribution_8h_source.html#l00244">244</a> of file <a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_pami_toy.html#a7b2eaab3d024a8731d184f3ed5f38949">draw()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Data/<a class="el" href="_data_distribution_8h_source.html">DataDistribution.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
